﻿using System;
using System.Collections.Generic;
using System.Text;
using GroupChat2013.Plugins;
using TestPlugin.Properties;
using System.Drawing;
using System.Windows.Forms;

namespace TestPlugin
{
    public class TestPlugin : IPlugin
    {
        private FrmTest m_FrmTest;

        public Image IconImage
        {
            get { return Resource.soso_icon_24; }
        }

        public string Description { get { return "这是一个测试插件"; } }

        public void Execute(PluginContext context)
        {
            //如果窗体未创建或者已经释放
            if (m_FrmTest == null || m_FrmTest.IsDisposed)
            {
                m_FrmTest = new FrmTest();
            }

            m_FrmTest.Show();
            m_FrmTest.WindowState = FormWindowState.Normal;
            WinAPI.SetActiveWindow(m_FrmTest.Handle);
        }

        public int Order
        {
            get { return 1; }
        }
    }
}
